.class public Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;
.super Ljava/lang/Object;
.source "DefaultInterstitialDecorator.java"

# interfaces
.implements Lcom/burstly/lib/component/networkcomponent/burstly/BurstlyFullscreenActivity$IDecorator;
.implements Landroid/view/View$OnClickListener;


# instance fields
.field private mActivity:Landroid/app/Activity;

.field private final mCloseButtonDelay:J

.field private mOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/IOverlayContainer;


# direct methods
.method public constructor <init>()V
    .locals 2

    .prologue
    .line 60
    const-wide/16 v0, 0x0

    invoke-direct {p0, v0, v1}, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;-><init>(J)V

    .line 61
    return-void
.end method

.method public constructor <init>(J)V
    .locals 0
    .parameter "closeButtonDelay"

    .prologue
    .line 52
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 53
    iput-wide p1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mCloseButtonDelay:J

    .line 54
    return-void
.end method

.method private createContainer(Landroid/view/View;Landroid/app/Activity;)Landroid/view/View;
    .locals 3
    .parameter "adView"
    .parameter "activity"

    .prologue
    .line 93
    invoke-virtual {p0, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->createContainer(Landroid/app/Activity;)Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;

    move-result-object v0

    .line 94
    .local v0, container:Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;,"Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer<Landroid/view/View;>;"
    const/4 v1, 0x1

    const-string v2, "top-right"

    invoke-virtual {v0, v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;->setShowCloseIndicator(ZLjava/lang/String;)V

    .line 95
    invoke-virtual {v0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;->putIntoContainer(Landroid/view/View;)V

    .line 96
    invoke-virtual {v0, p0}, Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;->setCloseClickListener(Landroid/view/View$OnClickListener;)V

    .line 97
    iget-wide v1, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mCloseButtonDelay:J

    invoke-virtual {v0, v1, v2}, Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;->setShowCloseButtonDelay(J)V

    .line 98
    return-object v0
.end method


# virtual methods
.method protected createContainer(Landroid/app/Activity;)Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;
    .locals 1
    .parameter "activity"
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "<Z:",
            "Landroid/view/View;",
            ">(",
            "Landroid/app/Activity;",
            ")",
            "Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer",
            "<TZ;>;"
        }
    .end annotation

    .prologue
    .line 109
    new-instance v0, Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;

    invoke-direct {v0, p1}, Lcom/burstly/lib/component/networkcomponent/burstly/html/CloseableContainer;-><init>(Landroid/content/Context;)V

    return-object v0
.end method

.method public decorate(Landroid/view/View;Landroid/app/Activity;)Landroid/view/View;
    .locals 1
    .parameter "adView"
    .parameter "fullscreenActivity"

    .prologue
    .line 75
    iput-object p2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mActivity:Landroid/app/Activity;

    .line 76
    invoke-direct {p0, p1, p2}, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->createContainer(Landroid/view/View;Landroid/app/Activity;)Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method public decorate(Landroid/view/View;Lcom/burstly/lib/component/networkcomponent/burstly/IOverlayContainer;)Landroid/view/View;
    .locals 1
    .parameter "adView"
    .parameter "shownOverlay"

    .prologue
    .line 81
    iput-object p2, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/IOverlayContainer;

    .line 82
    invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

    move-result-object v0

    check-cast v0, Landroid/app/Activity;

    invoke-direct {p0, p1, v0}, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->createContainer(Landroid/view/View;Landroid/app/Activity;)Landroid/view/View;

    move-result-object v0

    return-object v0
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1
    .parameter "v"

    .prologue
    .line 65
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/IOverlayContainer;

    if-eqz v0, :cond_1

    .line 66
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/IOverlayContainer;

    invoke-interface {v0}, Lcom/burstly/lib/component/networkcomponent/burstly/IOverlayContainer;->hideOverlayed()V

    .line 67
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mOverlay:Lcom/burstly/lib/component/networkcomponent/burstly/IOverlayContainer;

    .line 71
    :cond_0
    :goto_0
    return-void

    .line 68
    :cond_1
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mActivity:Landroid/app/Activity;

    if-eqz v0, :cond_0

    .line 69
    iget-object v0, p0, Lcom/burstly/lib/component/networkcomponent/burstly/DefaultInterstitialDecorator;->mActivity:Landroid/app/Activity;

    invoke-virtual {v0}, Landroid/app/Activity;->finish()V

    goto :goto_0
.end method
